home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / OutOfPhase1.01Source / OutOfPhase Folder / WaveTableStorageDisplay.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-01  |  2.3 KB  |  65 lines  |  [TEXT/KAHL]

  1. /* WaveTableStorageDisplay.h */
  2.  
  3. #ifndef Included_WaveTableStorageDisplay_h
  4. #define Included_WaveTableStorageDisplay_h
  5.  
  6. /* WaveTableStorageDisplay module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* SampleConsts */
  12. /* FixedPoint */
  13. /* Array */
  14. /* Memory */
  15. /* DataMunging */
  16.  
  17. #include "SampleConsts.h"
  18. #include "FixedPoint.h"
  19.  
  20. struct WaveTableStorDispRec;
  21. typedef struct WaveTableStorDispRec WaveTableStorDispRec;
  22.  
  23. /* create a new, empty wave table storage display object */
  24. WaveTableStorDispRec*        NewWaveTableStorDisp(NumBitsType NumBits, long NumFrames);
  25.  
  26. /* dispose of the wave table storage object */
  27. void                                        DisposeWaveTableStorDisp(WaveTableStorDispRec* StorDisp);
  28.  
  29. /* get the number of frames per table */
  30. long                                        WaveTableStorDispNumFramesPerTable(WaveTableStorDispRec* StorDisp);
  31.  
  32. /* get the number of tables */
  33. long                                        WaveTableStorDispNumTables(WaveTableStorDispRec* StorDisp);
  34.  
  35. /* get the number of bits for the wave table */
  36. NumBitsType                            WaveTableStorDispNumBits(WaveTableStorDispRec* StorDisp);
  37.  
  38. /* change the number of bits for the wave table */
  39. void                                        SetWaveTableStorDispNumBits(WaveTableStorDispRec* StorDisp,
  40.                                                     NumBitsType NewNumBits);
  41.  
  42. /* get a reference to a table.  this is NOT copied, and there is no type information. */
  43. /* it is formatted as an array of characters for 8 bit data or array of shorts for */
  44. /* 16 bit data.  it contains (WaveTableStorDispNumFramesPerTable + 1) elements for */
  45. /* each table.  The last element is a repeat of the first, and is provided for */
  46. /* making anti-aliasing more efficient. */
  47. largefixedsigned*                WaveTableStorDispGetTable(WaveTableStorDispRec* StorDisp,
  48.                                                     long Index);
  49.  
  50. /* append a new (zeroed out) table to the end of the array */
  51. MyBoolean                                WaveTableStorDispAppendEntry(WaveTableStorDispRec* StorDisp);
  52.  
  53. /* put a value into a frame in a table */
  54. void                                        WaveTableStorDispSetFrame(WaveTableStorDispRec* StorDisp,
  55.                                                     long TableIndex, long FrameIndex, largefixedsigned Value);
  56.  
  57. /* get a value from a frame in a table */
  58. largefixedsigned                WaveTableStorDispGetFrame(WaveTableStorDispRec* StorDisp,
  59.                                                     long TableIndex, long FrameIndex);
  60.  
  61. /* make a duplicate of the wave table */
  62. WaveTableStorDispRec*        WaveTableStorDispDuplicate(WaveTableStorDispRec* Original);
  63.  
  64. #endif
  65.